At any given point in time, applications as services may be managing different versions of a file. For instance, a local version of a file may be saved on a client device and a network version of the file may be maintained by a hosting service. The version of the hosting service may not be perfectly in sync when users are collaborating in real time, yet users expect the local file to: contain what they last saw on close and stay up-to-date with future changes from collaborators. Data loss is not acceptable in any case, no matter how rare that case may be.
To maintain file consistency, services typically use a hash comparison (of the different versions) to determine whether a local file is synced with respect to the server or not. In some configurations, uploads, by a client, are managed through a service and do not go directly to a hosting service. If a file is closed after changes are pushed to the service but before making it to the host, the “Host Hash” will be different and not match the “Local Hash”. Moreover, another issue is that different versions of a file may not be byte-wise equivalent, even if content is the same. So even if a client change is persisted to a host, the “Host Hash” and “Local Hash” may not match. As such, additional checks are needed to better manage file consistency between different computing devices in service-based examples.